import java.util.Arrays;

public class num167 {
    public int[] twoSum(int[] numbers, int target) {
        int i = 0;
        while (i < numbers.length) {
            int j;
            for (j = i + 1; j < numbers.length; j++) {
                if (numbers[i] + numbers[j] == target) {
                    return new int[]{i + 1, j + 1};
                } else if (numbers[i] + numbers[j] > target) {
                    break;
                }
            }
            i ++;
        }
        return null;
    }
}
